<template>
  <h1>{{ msg }}</h1>
  <van-button type="success" size="large" @click="routerFun()">成按钮</van-button>
</template>

<script setup>
  const msg = "我是";
  import {
    nextTick,
    getCurrentInstance,
  } from "vue";
  let {
    proxy
  } = getCurrentInstance();


  const routerFun = () => {
    nextTick(() => {
      console.log(proxy.$core);
      // console.log(vm.appContext);
      // console.log(vm.px2rem());
      proxy.$router.push({
        path: '/home2',
        query: {},
      });
    })
  }
</script>

<style lang="less">
  @red: #333;

  h1 {
    color: @red;
    font-size: 15px;
  }
</style>